package com.tengfei.main.exam.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tengfei.common.core.mapper.BaseMapperPlus;
import com.tengfei.main.exam.domain.PaperUser;
import com.tengfei.main.exam.domain.bo.UserRecodeBo;
import com.tengfei.main.exam.domain.vo.PaperUserVo;
import com.tengfei.main.exam.domain.vo.UserRecordVo;
import com.tengfei.main.system.domain.SysUser;
import com.tengfei.main.user.domain.vo.exam.UserPaperVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户考试结果Mapper接口
 *
 * @author tengfei
 * @date 2022-09-12
 */
public interface PaperUserMapper extends BaseMapperPlus<PaperUserMapper, PaperUser, PaperUserVo> {

    Page<PaperUserVo> selectBindUserList(@Param(Constants.WRAPPER) Wrapper<SysUser> buildQueryWrapperUser, @Param("page") Page<Object> build, @Param("paperId") Long paperId);

    Page<PaperUserVo> selectUnBindUserList(@Param(Constants.WRAPPER) Wrapper<SysUser> buildQueryWrapperUser, @Param("page") Page<Object> build, @Param("paperId") Long paperId);

    Page<UserRecordVo> selectUserRecode(@Param("page") Page<Object> build,
                                        @Param(Constants.WRAPPER) Wrapper<SysUser> buildQueryWrapperUser,
                                        @Param("bo") UserRecodeBo bo);

    List<UserRecordVo> exportUserRecode(@Param(Constants.WRAPPER) Wrapper<SysUser> buildQueryWrapperUser,
                                        @Param("bo") UserRecodeBo bo);

    List<UserPaperVo> selectUserPapers(@Param("paperStatus") Integer paperStatus, @Param("status") Integer status,
                                       @Param("paperName") String paperName, @Param("userId") Long userId);

}
